package com.kgc.warehouse.system.common;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ResponseResult {

    private String msg;
    private Integer code;
    private Object data;
    private Long count;

    public ResponseResult(){}

    public ResponseResult(CodeMsg codeMsg){
        this.code=codeMsg.getCode();
        this.msg=codeMsg.getMsg();
    }

    public ResponseResult(Object date,Long count,CodeMsg codeMsg){

        this(codeMsg);
        this.data=date;
        this.count=count;
    }

}
